﻿using AutoMapper;
using Hotel.Application.Admins.Dto;
using Hotel.Application.Dics.Dto;
using Hotel.Application.DicTypes.Dto;
using Hotel.Application.Menus.Dto;
using Hotel.Application.Roles.Dto;
using Hotel.Application.Suppliers.Dto;
using Hotel.Domain;

namespace Hotel.Application
{
    public class AutoMapperProfile : Profile
    {
        public AutoMapperProfile()
        {
            CreateMap<AdminCreateUpdateDto, Admin>().ReverseMap();
            CreateMap<AdminListDto, Admin>().ReverseMap();
            CreateMap<RoleCreateUpdateDto, Role>().ReverseMap();
            CreateMap<RoleListDto, Role>().ReverseMap();
            CreateMap<MenuCreateUpdateDto, Menu>().ReverseMap();
            CreateMap<MenuListDto, Menu>().ReverseMap();
            CreateMap<DicTypeCreateUpdateDto, DicType>().ReverseMap();
            CreateMap<DicTypeListDto, DicType>().ReverseMap();
            CreateMap<DicCreateUpdateDto, Dic>().ReverseMap();
            CreateMap<DicListDto, Dic>().ReverseMap();

            //供应商
            CreateMap<SupplierCreateUpdateDto, Supplier>().ReverseMap();
            CreateMap<SupplierListDto, Supplier>().ReverseMap();

        }
    }
}